﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GameProtocol.DTO;
using NetFrame;

namespace LOLServer.Biz.Account.Interface
{
    /// <summary>
    /// 用户逻辑中的事务层接口
    /// </summary>
    public interface IAccountBiz
    {
        /// <summary>
        /// 创建账户
        /// </summary>
        /// <param name="ut"></param>
        /// <param name="AccountId"></param>
        /// <param name="PassToken"></param>
        /// <returns>返回结果 0成功，1账户重复，2密码(passtoken)不正确</returns>
        int CreateAccount(UserToken ut, string PassToken, ref int accountId);
        /// <summary>
        /// 登录  
        /// </summary>
        /// <param name="ut"></param>
        /// <param name="AccountId"></param> 
        /// <param name="PassToken"></param>
        /// <returns>返回结果 0成功，1账户不存在</returns>
        int LoginAccount(UserToken ut, int AccountId, string PassToken, ref int accountId); 
        /// <summary>
        /// 客户端断开连接  
        /// </summary>
        /// <param name="ut"></param>
        void DisConnect(UserToken ut, string error);
        /// <summary>
        /// 获取账户ID 
        /// </summary>
        /// <param name="ut"></param>
        /// <returns></returns>
        int GetAccountId(UserToken ut);

        string HandShake(UserToken ut, string value); 
    }
}
